﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace SmartConference.Infrastructure.Migrations
{
    public partial class 部门 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "DepartmentInfo",
                columns: table => new
                {
                    DepartmentId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ParentId = table.Column<int>(type: "int", nullable: false),
                    DepartmentName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentStatus = table.Column<int>(type: "int", nullable: false),
                    MemberNumber = table.Column<int>(type: "int", nullable: false),
                    Governor = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    DepartmentDesc = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateId = table.Column<int>(type: "int", nullable: false),
                    CreateName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreateTime = table.Column<DateTime>(type: "datetime2", nullable: false),
                    UpdateId = table.Column<int>(type: "int", nullable: true),
                    UpdateName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DeleteId = table.Column<int>(type: "int", nullable: true),
                    DeleteName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    DeleteTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsDelete = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_DepartmentInfo", x => x.DepartmentId);
                });

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 5, 27, 10, 27, 42, 664, DateTimeKind.Local).AddTicks(297));
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "DepartmentInfo");

            migrationBuilder.UpdateData(
                table: "UserInfo",
                keyColumn: "IDNumber",
                keyValue: 1L,
                column: "Birthday",
                value: new DateTime(2025, 5, 27, 10, 26, 53, 646, DateTimeKind.Local).AddTicks(2107));
        }
    }
}
